<head>
    <meta charset="UTF-8">
    <!--<meta http-equiv="refresh" content="2;url=index.php"-->
</head>
<table align="center" width="500" border="0">
    <tr>
        <td class="title">ID</td>
        <td class="title">Name</td>
    </tr>
    <?php
	if(isset($_POST['ok'])){
		if($_POST['user']==""){
			echo "Vui lòng nh?p t? khóa tìm ki?m!";	
		}else{
			$user=$_POST['user'];
		}	
	}
	if($user){
	$conn=mysql_connect("localhost","root","vertrigo") or die("can't connect this database");
	mysql_select_db("tdc",$conn);
	$sql="select * from students where name LIKE '%$user%'";
	$query=mysql_query($sql);
    if(mysql_num_rows($query)!=""){
    $stt=1;
    while($row=mysql_fetch_array($query)){
    $stt++;
    echo "<tr>";
    echo "<td>".$row['ID']."</td>";
    echo "<td>".$row['Name']."</td>";
    echo "</tr>";
    }
    }else{
    echo "<tr><td colspan='4' align='center'>Chưa có thành viên nào</td></tr>";
    }
	}
    ?>
</table>